<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div>
        <div>
            <table>
                <tr>
                    <th>
                        账号：
                    </th>
                    <th>
                        <input type="text" placeholder="请输入账号" name="zhanghao">
                    </th>
                </tr>
                <tr>
                    <th>
                        密码：
                    </th>
                    <th>
                        <input type="text" placeholder="请输入密码" name="password">
                    </th>
                </tr>
                <tr>
                    <th>
                        <input type="button" value="登录" onclick="login()">
                    </th>
                    <th>
                        <input type="button" value="注册" onclick="add()">
                    </th>
                </tr>
            </table>
        </div>
    </div>
    <script src="./jquery-3.6.0.min.js"></script>
    <script src="./baseurl.js"></script>
    <script src="./js.js"></script>
    <script>
        function login() {

            let use = $(`[name=zhanghao]`).val();
            let password = $(`[name=password]`).val();
            if (use != '' && password != '') {
                getlistlogin(use, password);
            }else{
                alert('账号密码不能为空')
            }

        }
        function add(){
                location.href='./create.html'
        }
    </script>
</body>

</html>